/*
 *  Element.h
 *  Hashtable
 *
 *  Created by Christoph Ehscheidt on 05.06.07.
 *	Modified by Andy Albert Fuchs
 *  Copyright 2007 __MyCompanyName__. All rights reserved.
 *
 */

#ifndef _element_
#define _element_

#include <Value.h>

using namespace std;

/**
* Element which provides the hashcode, tokentyp and lexemlength of a variable an its value
*/
class Element
{
	int hashcode;
	int tokenTyp;
	int lexemLength;

	char* lexem;

	Value* value;
	
public:	
	Element(int hashcode, int tokenTyp, char* lexem, int lexemLength);

	void setValue(Value* value);

	Value* getValue() const;

	char* getLexem() const;
	char* getKey() const;

	int getTokenTyp() const;
	int getLexemLength() const;

	int getHashcode() const;

};

ostream& operator<<(ostream& ostream, Element& element);

#endif
